﻿@{
    ViewData["Title"] = "Get Inserted Record Id From Dialog";
}

@section ContentHeader {
    <h1>@ViewData["Title"]<small></small></h1>
}

<div class="alert alert-info alert-dismissable">
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    <p>
        You might need to get ID of inserted record from a dialog, show some message, 
        or open another dialog for it. onSaveSuccess is a good place for this.
    </p>
    <p>
        Insert a new category and we'll show a message about inserted record. 
        This will do nothing for updates.
    </p>

    <p style="text-align: right;">
        <b>Source Files:</b>
        @Html.AppSourceFile("Index.cshtml"),
        @Html.AppSourceFile("GetInsertedRecordIdDialog.ts")
        @Html.AppSourceFile("GetInsertedRecordIdGrid.ts")
    </p>
</div>

<div id="GridDiv"></div>

<script type="text/javascript">
    jQuery(function () {
        new Serene.BasicSamples.GetInsertedRecordIdGrid($('#GridDiv'), {}).init();

        Q.initFullHeightGridPage($('#GridDiv'));
    });
</script>